//app.js
App({
  onLaunch: function () {
    // 展示本地存储能力
    var configs = wx.getStorageSync('configs');
    if (!configs){
      configs = this.initConfigs();
    } 
    wx.setStorageSync('configs', configs)
  },
  globalData: {
    userInfo: null
  },
  initConfigs:function(){
    var configs=[];
    var config = this.initConfig("config1", "立论阶段", 180, true,"\n \n（一）正方一辩开篇立论，@；\n（二）反方一辩开篇立论，@。",15);
    configs.push(config);
    config = this.initConfig("config2", "驳立论阶段", 120, true, "\n \n（一）反方二辩驳正方开篇立论，@；\n（二）正方二辩驳反方开篇立论，@。", 15);
    configs.push(config);
    config = this.initConfig("config3", "质辩环节", 90, true, "\n \n（一）正方三遍提问反方一、二、四辩各一个问题，反方辩手分别应。三个问题累计回答时间@；\n（二）反方三遍提问正方一、二、四辩各一个问题，反方辩手分别应。三个问题累计回答时间@。", 15);
    configs.push(config);
    config = this.initConfig("config4", "自由辩论", 240, true, "\n \n自由辩论总计@。", 15);
    configs.push(config);
    config = this.initConfig("config5", "总结陈词", 180, true, "\n \n（一）正方总结陈词，@；\n（二）反方总结陈词，@。", 15);
    configs.push(config);
    return  configs;
  },
  initConfig:function(id,title,time,checked,desc,countDown){
    var config = new Object();
    config.id = id;
    config.title = title;
    config.time = time;
    config.checked = checked;
    config.desc = desc;
    config.countDown = countDown;
    return config;
  }
})